#pragma once

#include <QFormLayout>
#include <QGroupBox>
#include <QHBoxLayout>
#include <QHostAddress>
#include <QLabel>
#include <QLineEdit>
#include <QListWidget>
#include <QPair>
#include <QPushButton>
#include <QVBoxLayout>
#include <QWidget>

static const QString LAUNCH_TEXT = "启动";
static const QString QUIT_TEXT = "关闭";

class AddressPanel : public QWidget {
    Q_OBJECT
private:
    QLineEdit *ip_input, *port_input;
    QPushButton* launch_button;

    QFormLayout* form;
    QVBoxLayout* widget_layout;

public:
    explicit AddressPanel(QWidget* parent);

    QPair<QString, int> getAddress();

public slots:
    void onLaunchButtonClicked();

signals:
#pragma clang diagnostic push
#pragma ide diagnostic ignored "NotImplementedFunctions"
    void launched();
    void quited();
#pragma clang diagnostic pop
};
